{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import json\n",
    "import codecs\n",
    "import numpy as np\n",
    "import tensorflow as tf\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = '1'\n",
    "gpus = tf.config.experimental.list_physical_devices(device_type='GPU')\n",
    "for gpu in gpus:\n",
    "    tf.config.experimental.set_memory_growth(gpu, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "params = {\n",
    "    'batch_size': 64,\n",
    "    'lr' : 0.001,\n",
    "    'max_sent_len': 20,\n",
    "    'epochs': 200,\n",
    "    'drops' : [0.1]\n",
    "         }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def extract_data(data_path):\n",
    "    \"\"\"\n",
    "    意图识别抽取出label\n",
    "    槽位识别与填充作为命名实体识别问题，对每一个字进行实体标注, ate_time', 'B-target', 'I-date_time', 'I-date_time', 'I-operation', 'I-date_time', 'I-date_time']\n",
    "[ ]:\n",
    "￼\n",
    "​B E I O S\n",
    "    \"\"\"\n",
    "    with codecs.open(data_path,\"r\",encoding=\"utf-8\") as fp:\n",
    "        data = json.load(fp)\n",
    "    texts = [example['text'].replace(\" \",\"\") for example in data]\n",
    "    intent_labels = [example['intent'] for example in data]\n",
    "    \n",
    "    slots_ners = []\n",
    "    count = 0\n",
    "    for example in data:\n",
    "        if 'entities' in example.keys():\n",
    "            text = example['text']\n",
    "            ner = ['O'] * len(text)\n",
    "            slots = example['entities']\n",
    "            for key,val in slots.items():\n",
    "                start_idx = text.find(val)\n",
    "                end_idx = start_idx + len(val) -1\n",
    "                if len(val) == 1:\n",
    "                    ner[start_idx] = 'S-' + key\n",
    "                else:\n",
    "                    ner[start_idx] = 'B-' + key\n",
    "                    ner[end_idx] = 'E-'+ key\n",
    "                    for idx in range(start_idx+1, end_idx):\n",
    "                        ner[idx] = 'I-' + key\n",
    "        else:\n",
    "            text = example['text']\n",
    "            ner = ['O'] * len(text)\n",
    "        slots_ners.append(ner)\n",
    "    print('texts len: ', len(texts))\n",
    "    print('intent_lables len: ',len(intent_labels))\n",
    "    print('slots_ners len: ', len(slots_ners))\n",
    "    return texts, intent_labels, slots_ners        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "texts len:  2542\n",
      "intent_lables len:  2542\n",
      "slots_ners len:  2542\n"
     ]
    }
   ],
   "source": [
    "data_path =\"../dataset/data_v2.json\"\n",
    "max_sent_len = params[\"max_sent_len\"]\n",
    "texts, intent_labels, slots_ners = extract_data(data_path)\n",
    "# l = len(texts) // params['batch_size']\n",
    "# texts = texts[:l*params['batch_size']]\n",
    "# intent =  intent[:l*params['batch_size']]\n",
    "# slots_ners = slots_ners[:l*params['batch_size']]\n",
    "train_text = [d for i , d in enumerate(texts) if i % 10 != 0]\n",
    "train_l = len(train_text) // params['batch_size']\n",
    "train_text = train_text[:train_l*params['batch_size']]\n",
    "valid_text = [d for i , d in enumerate(texts) if i % 10 == 0]\n",
    "valid_l = len(valid_text) // params['batch_size']\n",
    "valid_text = valid_text[:valid_l*params['batch_size']]\n",
    "\n",
    "train_intent = [d for i , d in enumerate(intent_labels) if i % 10 != 0]\n",
    "train_intent = train_intent[:train_l*params['batch_size']]\n",
    "valid_intent = [d for i , d in enumerate(intent_labels) if i % 10 == 0]\n",
    "valid_intent = valid_intent[:valid_l*params['batch_size']]\n",
    "\n",
    "train_ner = [d for i , d in enumerate(slots_ners) if i % 10 != 0]\n",
    "train_ner = train_ner[:train_l*params['batch_size']]\n",
    "valid_ner = [d for i , d in enumerate(slots_ners) if i % 10 == 0]\n",
    "valid_ner =valid_ner[:valid_l*params['batch_size']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('../char_6.17.json', mode='r', encoding='utf-8') as f:\n",
    "    dicts = json.load(f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "char2id = dicts['char2id']\n",
    "id2char = dicts['id2char']\n",
    "intent2id = dicts['intent2id']\n",
    "id2intent = dicts['id2intent']\n",
    "slot2id = dicts['slot2id']\n",
    "id2slot = dicts['id2slot']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "params['intent_num'] = len(intent2id)\n",
    "params['slot_num'] = len(slot2id)\n",
    "params['id2intent'] = id2intent\n",
    "params['id2slot'] = id2slot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def trans2labelid(vocab, labels, max_sent_len):\n",
    "    labels = [vocab[label] for label in labels]\n",
    "    if len(labels) < max_sent_len:\n",
    "        labels += [0] * (max_sent_len - len(labels))\n",
    "    else:\n",
    "        labels = labels[:max_sent_len]\n",
    "    return labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def read_data(txt_seqs, intent_labels, slot_ners,char2id,intent2id,slot2id,max_sent_len):\n",
    "    dataset_text_labels = []\n",
    "    dataset_intent_labels = []\n",
    "    dataset_ner_labels = []\n",
    "    \n",
    "    for index in range(len(txt_seqs)):\n",
    "        dataset_text_labels.append(trans2labelid(char2id,txt_seqs[index],max_sent_len))\n",
    "        dataset_intent_labels.append([intent2id[intent_labels[index]]])\n",
    "        dataset_ner_labels.append(trans2labelid(slot2id,slot_ners[index],max_sent_len))\n",
    "    dataset_text_labels = np.array(dataset_text_labels)\n",
    "    dataset_intent_labels = np.array(dataset_intent_labels)\n",
    "    dataset_ner_labels = np.array(dataset_ner_labels)\n",
    "    \n",
    "    return dataset_text_labels, dataset_intent_labels, dataset_ner_labels "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "tarin_seq, train_intent, train_ner =  read_data(train_text, train_intent, train_ner,char2id,intent2id,slot2id,max_sent_len) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "valid_seq, valid_intent, valid_ner =  read_data(valid_text, valid_intent, valid_ner,char2id,intent2id,slot2id,max_sent_len) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "def Dataset(txt_seqs, dataset_intent_labels, dataset_ner_labels):\n",
    "    dataset = tf.data.Dataset.from_tensor_slices(({\n",
    "    \"Input\" : txt_seqs\n",
    "    },\n",
    "    {\n",
    "        \"pre_intent\":dataset_intent_labels,\n",
    "        \n",
    "        \"pre_ner\":dataset_ner_labels\n",
    "    }))\n",
    "    dataset = dataset.batch(params['batch_size'])\n",
    "    return dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_dataset = Dataset(tarin_seq, train_intent, train_ner)\n",
    "valid_dataset = Dataset(valid_seq, valid_intent, valid_ner)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tensorflow.keras.layers import Layer\n",
    "\n",
    "class MultiHeadAttention(Layer):\n",
    "    def __init__(\n",
    "            self,\n",
    "            heads,\n",
    "            head_size,\n",
    "            out_dim=None,\n",
    "            use_bias=True,\n",
    "#             max_value = 1,\n",
    "#             min_value = -1\n",
    "            **kwargs\n",
    "    ):\n",
    "        super(MultiHeadAttention, self).__init__(**kwargs)\n",
    "        self.heads = heads\n",
    "        self.head_size = head_size\n",
    "        self.out_dim = out_dim \n",
    "        self.use_bias = use_bias\n",
    "\n",
    "    def build(self, input_shape):\n",
    "        super(MultiHeadAttention, self).build(input_shape)\n",
    "        self.q_dense = tf.keras.layers.Dense(\n",
    "            units=self.head_size * self.heads,\n",
    "            use_bias=self.use_bias,\n",
    "            kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            name = 'q'\n",
    "            \n",
    "        )\n",
    "        self.k_dense = tf.keras.layers.Dense(\n",
    "            units=self.head_size * self.heads,\n",
    "            use_bias=self.use_bias,\n",
    "            kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            name = 'k'\n",
    "        )\n",
    "        self.v_dense = tf.keras.layers.Dense(\n",
    "            units=self.head_size * self.heads,\n",
    "            use_bias=self.use_bias,\n",
    "            kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            name = 'v'\n",
    "        )\n",
    "        self.o_dense = tf.keras.layers.Dense( \n",
    "            units=self.out_dim,\n",
    "            use_bias=self.use_bias,\n",
    "            kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            name = 'o'\n",
    "        )\n",
    "\n",
    "    def call(self, inputs):\n",
    "        q = inputs\n",
    "        k = inputs\n",
    "        v = inputs\n",
    "        # 线性变化\n",
    "        qw = self.q_dense(q)\n",
    "        kw = self.k_dense(k)\n",
    "        vw = self.v_dense(v)\n",
    "        # 形状变换\n",
    "        qw = tf.reshape(qw, (-1, tf.shape(q)[1], self.heads, self.head_size))\n",
    "        kw = tf.reshape(kw, (-1, tf.shape(q)[1], self.heads, self.head_size))\n",
    "        vw = tf.reshape(vw, (-1, tf.shape(q)[1], self.heads, self.head_size))\n",
    "        # attention\n",
    "        qkv_inputs = [qw, kw, vw]\n",
    "        o = self.pay_attention_to(qkv_inputs)\n",
    "        o = tf.reshape(o, (-1, tf.shape(o)[1], self.head_size * self.heads))\n",
    "        o = self.o_dense(o)\n",
    "        return o\n",
    "\n",
    "    def pay_attention_to(self, inputs):\n",
    "        (qw, kw, vw) = inputs[:3]\n",
    "        a = tf.einsum('bjhd,bkhd->bhjk', qw, kw)\n",
    "        a = a / self.head_size ** 0.5\n",
    "        A = tf.nn.softmax(a)\n",
    "        o = tf.einsum('bhjk,bkhd -> bjhd', A, vw)\n",
    "#         print(o)\n",
    "        return o"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tensorflow.keras.layers import concatenate, Dropout,LayerNormalization, Dense, add"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Encoder(tf.keras.models.Model):\n",
    "    def __init__(\n",
    "        self,\n",
    "        layer_count,\n",
    "        **kwargs\n",
    "    ):\n",
    "        super(Encoder, self).__init__(**kwargs)\n",
    "        self.layer_count = layer_count\n",
    "        \n",
    "    def build(self,input_shape):\n",
    "        self.MultiHeadAttention =  MultiHeadAttention(heads=16,head_size=4,out_dim=32)\n",
    "        self.dropout_1 = Dropout(0.1)\n",
    "        self.l1 =  LayerNormalization(name='normal')\n",
    "        self.feed1 = Dense(32,name='feed')\n",
    "        self.dropout1 = Dropout(0.1)\n",
    "        self.l_1 =  LayerNormalization(name='normal1')\n",
    "        \n",
    "    def call(self,inputs):\n",
    "        state = inputs\n",
    "        for i in range(self.layer_count):\n",
    "#             print('state: ',i)\n",
    "            att1 = self.MultiHeadAttention(state)\n",
    "            att_1 = add([att1,state])\n",
    "            dropout1  = self.dropout_1(att_1)\n",
    "            l1 = self.l1(att_1)\n",
    "            feed1 =self.feed1(l1)\n",
    "            dropout_1  = self.dropout1(feed1)\n",
    "            l_1 = self.l_1(feed1)\n",
    "            state = l_1\n",
    "        return state"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"functional_1\"\n",
      "__________________________________________________________________________________________________\n",
      "Layer (type)                    Output Shape         Param #     Connected to                     \n",
      "==================================================================================================\n",
      "Input (InputLayer)              [(None, 20)]         0                                            \n",
      "__________________________________________________________________________________________________\n",
      "embedding (Embedding)           (None, 20, 32)       16000       Input[0][0]                      \n",
      "__________________________________________________________________________________________________\n",
      "encoder (Encoder)               (None, 20, 32)       9600        embedding[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "global_average_pooling1d (Globa (None, 32)           0           encoder[0][0]                    \n",
      "__________________________________________________________________________________________________\n",
      "pre_intent (Dense)              (None, 55)           1815        global_average_pooling1d[0][0]   \n",
      "__________________________________________________________________________________________________\n",
      "pre_ner (Dense)                 (None, 20, 36)       1188        encoder[0][0]                    \n",
      "==================================================================================================\n",
      "Total params: 28,603\n",
      "Trainable params: 28,603\n",
      "Non-trainable params: 0\n",
      "__________________________________________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "tf.keras.backend.clear_session()\n",
    "text_inputs = tf.keras.layers.Input(shape=(20,),name='Input')\n",
    "embed = tf.keras.layers.Embedding(500,32)(text_inputs)\n",
    "\n",
    "l_1 = Encoder(layer_count=3)(embed)\n",
    "\n",
    "conv = tf.keras.layers.GlobalAveragePooling1D()(l_1)\n",
    "pre_intent = tf.keras.layers.Dense(params['intent_num'],activation='sigmoid',name = 'pre_intent',kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0))(conv)\n",
    "pre_slot = tf.keras.layers.Dense(params['slot_num'],activation='sigmoid',name = 'pre_ner',kernel_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0),\n",
    "            bias_constraint = tf.keras.constraints.MinMaxNorm(min_value=-1.0))(l_1)\n",
    "model = tf.keras.Model(text_inputs,[pre_intent,pre_slot])\n",
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "losses = {'pre_intent':'sparse_categorical_crossentropy','pre_ner':'sparse_categorical_crossentropy'}\n",
    "metrics = { 'pre_intent': ['accuracy'],'pre_ner': ['accuracy']}\n",
    "optimizer = tf.keras.optimizers.Adam(params['lr'])\n",
    "model.compile(optimizer, loss=losses, metrics=metrics)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "checkpoint = tf.keras.callbacks.ModelCheckpoint(filepath='../ner_model_weight/model_encoder_714.h5',save_weights_only=True,save_best_only=True)\n",
    "reduce_lr = tf.keras.callbacks.ReduceLROnPlateau(patience=20,factor=0.8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.7753 - pre_intent_loss: 0.3789 - pre_ner_loss: 0.3964 - pre_intent_accuracy: 0.9781 - pre_ner_accuracy: 0.9038 - val_loss: 0.9378 - val_pre_intent_loss: 0.5260 - val_pre_ner_loss: 0.4118 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9052\n",
      "Epoch 2/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.7550 - pre_intent_loss: 0.3633 - pre_ner_loss: 0.3917 - pre_intent_accuracy: 0.9799 - pre_ner_accuracy: 0.9059 - val_loss: 0.9086 - val_pre_intent_loss: 0.5132 - val_pre_ner_loss: 0.3954 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9141\n",
      "Epoch 3/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.7257 - pre_intent_loss: 0.3330 - pre_ner_loss: 0.3927 - pre_intent_accuracy: 0.9812 - pre_ner_accuracy: 0.9062 - val_loss: 0.8777 - val_pre_intent_loss: 0.4975 - val_pre_ner_loss: 0.3801 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9161\n",
      "Epoch 4/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.6898 - pre_intent_loss: 0.3083 - pre_ner_loss: 0.3815 - pre_intent_accuracy: 0.9839 - pre_ner_accuracy: 0.9093 - val_loss: 0.8274 - val_pre_intent_loss: 0.4667 - val_pre_ner_loss: 0.3607 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9117\n",
      "Epoch 5/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.6771 - pre_intent_loss: 0.3114 - pre_ner_loss: 0.3657 - pre_intent_accuracy: 0.9844 - pre_ner_accuracy: 0.9124 - val_loss: 0.8168 - val_pre_intent_loss: 0.4409 - val_pre_ner_loss: 0.3759 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9125\n",
      "Epoch 6/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.6635 - pre_intent_loss: 0.3029 - pre_ner_loss: 0.3606 - pre_intent_accuracy: 0.9839 - pre_ner_accuracy: 0.9119 - val_loss: 0.8522 - val_pre_intent_loss: 0.4583 - val_pre_ner_loss: 0.3939 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9042\n",
      "Epoch 7/200\n",
      "35/35 [==============================] - 0s 9ms/step - loss: 0.6515 - pre_intent_loss: 0.2871 - pre_ner_loss: 0.3644 - pre_intent_accuracy: 0.9853 - pre_ner_accuracy: 0.9120 - val_loss: 0.8336 - val_pre_intent_loss: 0.4596 - val_pre_ner_loss: 0.3739 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9146\n",
      "Epoch 8/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.6350 - pre_intent_loss: 0.2738 - pre_ner_loss: 0.3611 - pre_intent_accuracy: 0.9853 - pre_ner_accuracy: 0.9125 - val_loss: 0.7964 - val_pre_intent_loss: 0.4374 - val_pre_ner_loss: 0.3590 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9161\n",
      "Epoch 9/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.6262 - pre_intent_loss: 0.2724 - pre_ner_loss: 0.3538 - pre_intent_accuracy: 0.9853 - pre_ner_accuracy: 0.9131 - val_loss: 0.8070 - val_pre_intent_loss: 0.4315 - val_pre_ner_loss: 0.3756 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9120\n",
      "Epoch 10/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.6090 - pre_intent_loss: 0.2607 - pre_ner_loss: 0.3483 - pre_intent_accuracy: 0.9862 - pre_ner_accuracy: 0.9147 - val_loss: 0.7630 - val_pre_intent_loss: 0.4104 - val_pre_ner_loss: 0.3526 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9232\n",
      "Epoch 11/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.5897 - pre_intent_loss: 0.2474 - pre_ner_loss: 0.3423 - pre_intent_accuracy: 0.9862 - pre_ner_accuracy: 0.9169 - val_loss: 0.8112 - val_pre_intent_loss: 0.4439 - val_pre_ner_loss: 0.3673 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9096\n",
      "Epoch 12/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.5977 - pre_intent_loss: 0.2526 - pre_ner_loss: 0.3452 - pre_intent_accuracy: 0.9844 - pre_ner_accuracy: 0.9165 - val_loss: 0.7941 - val_pre_intent_loss: 0.4197 - val_pre_ner_loss: 0.3744 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9036\n",
      "Epoch 13/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.6039 - pre_intent_loss: 0.2650 - pre_ner_loss: 0.3389 - pre_intent_accuracy: 0.9817 - pre_ner_accuracy: 0.9163 - val_loss: 0.7870 - val_pre_intent_loss: 0.4174 - val_pre_ner_loss: 0.3696 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9107\n",
      "Epoch 14/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.5974 - pre_intent_loss: 0.2494 - pre_ner_loss: 0.3480 - pre_intent_accuracy: 0.9830 - pre_ner_accuracy: 0.9117 - val_loss: 0.7619 - val_pre_intent_loss: 0.4236 - val_pre_ner_loss: 0.3383 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9211\n",
      "Epoch 15/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.5857 - pre_intent_loss: 0.2430 - pre_ner_loss: 0.3427 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9144 - val_loss: 0.7407 - val_pre_intent_loss: 0.3793 - val_pre_ner_loss: 0.3614 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9161\n",
      "Epoch 16/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.5697 - pre_intent_loss: 0.2305 - pre_ner_loss: 0.3392 - pre_intent_accuracy: 0.9848 - pre_ner_accuracy: 0.9170 - val_loss: 0.7200 - val_pre_intent_loss: 0.3780 - val_pre_ner_loss: 0.3420 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9156\n",
      "Epoch 17/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.5468 - pre_intent_loss: 0.2159 - pre_ner_loss: 0.3309 - pre_intent_accuracy: 0.9884 - pre_ner_accuracy: 0.9168 - val_loss: 0.7138 - val_pre_intent_loss: 0.3730 - val_pre_ner_loss: 0.3409 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9185\n",
      "Epoch 18/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.5285 - pre_intent_loss: 0.2056 - pre_ner_loss: 0.3229 - pre_intent_accuracy: 0.9871 - pre_ner_accuracy: 0.9192 - val_loss: 0.6815 - val_pre_intent_loss: 0.3580 - val_pre_ner_loss: 0.3235 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9206\n",
      "Epoch 19/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.5098 - pre_intent_loss: 0.2023 - pre_ner_loss: 0.3075 - pre_intent_accuracy: 0.9848 - pre_ner_accuracy: 0.9212 - val_loss: 0.6537 - val_pre_intent_loss: 0.3414 - val_pre_ner_loss: 0.3123 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9234\n",
      "Epoch 20/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.4895 - pre_intent_loss: 0.1879 - pre_ner_loss: 0.3016 - pre_intent_accuracy: 0.9871 - pre_ner_accuracy: 0.9248 - val_loss: 0.6517 - val_pre_intent_loss: 0.3384 - val_pre_ner_loss: 0.3133 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9245\n",
      "Epoch 21/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.4777 - pre_intent_loss: 0.1745 - pre_ner_loss: 0.3032 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9252 - val_loss: 0.6620 - val_pre_intent_loss: 0.3375 - val_pre_ner_loss: 0.3245 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9253\n",
      "Epoch 22/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.4729 - pre_intent_loss: 0.1778 - pre_ner_loss: 0.2951 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9250 - val_loss: 0.6358 - val_pre_intent_loss: 0.3114 - val_pre_ner_loss: 0.3244 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9201\n",
      "Epoch 23/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.4799 - pre_intent_loss: 0.1729 - pre_ner_loss: 0.3070 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9210 - val_loss: 0.7717 - val_pre_intent_loss: 0.3409 - val_pre_ner_loss: 0.4308 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.8576\n",
      "Epoch 24/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.4840 - pre_intent_loss: 0.1795 - pre_ner_loss: 0.3045 - pre_intent_accuracy: 0.9857 - pre_ner_accuracy: 0.9243 - val_loss: 0.6806 - val_pre_intent_loss: 0.3578 - val_pre_ner_loss: 0.3229 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9221\n",
      "Epoch 25/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.4833 - pre_intent_loss: 0.1854 - pre_ner_loss: 0.2979 - pre_intent_accuracy: 0.9879 - pre_ner_accuracy: 0.9234 - val_loss: 0.6845 - val_pre_intent_loss: 0.3461 - val_pre_ner_loss: 0.3384 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9203\n",
      "Epoch 26/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.4847 - pre_intent_loss: 0.1750 - pre_ner_loss: 0.3097 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9219 - val_loss: 0.6591 - val_pre_intent_loss: 0.3362 - val_pre_ner_loss: 0.3229 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9240\n",
      "Epoch 27/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.4719 - pre_intent_loss: 0.1650 - pre_ner_loss: 0.3069 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9167 - val_loss: 0.6916 - val_pre_intent_loss: 0.3783 - val_pre_ner_loss: 0.3133 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9242\n",
      "Epoch 28/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.4709 - pre_intent_loss: 0.1728 - pre_ner_loss: 0.2981 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9228 - val_loss: 0.6351 - val_pre_intent_loss: 0.3085 - val_pre_ner_loss: 0.3266 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9232\n",
      "Epoch 29/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.4587 - pre_intent_loss: 0.1607 - pre_ner_loss: 0.2980 - pre_intent_accuracy: 0.9875 - pre_ner_accuracy: 0.9215 - val_loss: 0.5986 - val_pre_intent_loss: 0.3002 - val_pre_ner_loss: 0.2984 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9279\n",
      "Epoch 30/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.4424 - pre_intent_loss: 0.1567 - pre_ner_loss: 0.2857 - pre_intent_accuracy: 0.9893 - pre_ner_accuracy: 0.9246 - val_loss: 0.6244 - val_pre_intent_loss: 0.3207 - val_pre_ner_loss: 0.3037 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9276\n",
      "Epoch 31/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.4274 - pre_intent_loss: 0.1465 - pre_ner_loss: 0.2809 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9284 - val_loss: 0.5594 - val_pre_intent_loss: 0.2767 - val_pre_ner_loss: 0.2828 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9279\n",
      "Epoch 32/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.4148 - pre_intent_loss: 0.1378 - pre_ner_loss: 0.2770 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9271 - val_loss: 0.6218 - val_pre_intent_loss: 0.2951 - val_pre_ner_loss: 0.3266 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9065\n",
      "Epoch 33/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.4057 - pre_intent_loss: 0.1356 - pre_ner_loss: 0.2701 - pre_intent_accuracy: 0.9893 - pre_ner_accuracy: 0.9297 - val_loss: 0.5580 - val_pre_intent_loss: 0.2866 - val_pre_ner_loss: 0.2714 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9336\n",
      "Epoch 34/200\n",
      "35/35 [==============================] - 1s 14ms/step - loss: 0.4015 - pre_intent_loss: 0.1350 - pre_ner_loss: 0.2664 - pre_intent_accuracy: 0.9884 - pre_ner_accuracy: 0.9283 - val_loss: 0.5792 - val_pre_intent_loss: 0.2865 - val_pre_ner_loss: 0.2927 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9302\n",
      "Epoch 35/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.3970 - pre_intent_loss: 0.1267 - pre_ner_loss: 0.2703 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9249 - val_loss: 0.5569 - val_pre_intent_loss: 0.2903 - val_pre_ner_loss: 0.2666 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9341\n",
      "Epoch 36/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3910 - pre_intent_loss: 0.1243 - pre_ner_loss: 0.2667 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9311 - val_loss: 0.5930 - val_pre_intent_loss: 0.2875 - val_pre_ner_loss: 0.3055 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9250\n",
      "Epoch 37/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.3886 - pre_intent_loss: 0.1261 - pre_ner_loss: 0.2625 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9297 - val_loss: 0.5464 - val_pre_intent_loss: 0.2796 - val_pre_ner_loss: 0.2667 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9302\n",
      "Epoch 38/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.3833 - pre_intent_loss: 0.1270 - pre_ner_loss: 0.2564 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9309 - val_loss: 0.5449 - val_pre_intent_loss: 0.2625 - val_pre_ner_loss: 0.2824 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9336\n",
      "Epoch 39/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.3767 - pre_intent_loss: 0.1202 - pre_ner_loss: 0.2564 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9308 - val_loss: 0.5297 - val_pre_intent_loss: 0.2715 - val_pre_ner_loss: 0.2582 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9331\n",
      "Epoch 40/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.3651 - pre_intent_loss: 0.1124 - pre_ner_loss: 0.2527 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9327 - val_loss: 0.5534 - val_pre_intent_loss: 0.2714 - val_pre_ner_loss: 0.2820 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9258\n",
      "Epoch 41/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.3583 - pre_intent_loss: 0.1114 - pre_ner_loss: 0.2469 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9353 - val_loss: 0.5302 - val_pre_intent_loss: 0.2798 - val_pre_ner_loss: 0.2504 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9341\n",
      "Epoch 42/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.3587 - pre_intent_loss: 0.1141 - pre_ner_loss: 0.2446 - pre_intent_accuracy: 0.9879 - pre_ner_accuracy: 0.9338 - val_loss: 0.5269 - val_pre_intent_loss: 0.2551 - val_pre_ner_loss: 0.2717 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9320\n",
      "Epoch 43/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3538 - pre_intent_loss: 0.1072 - pre_ner_loss: 0.2466 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9293 - val_loss: 0.5237 - val_pre_intent_loss: 0.2675 - val_pre_ner_loss: 0.2562 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9383\n",
      "Epoch 44/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3577 - pre_intent_loss: 0.1095 - pre_ner_loss: 0.2482 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9355 - val_loss: 0.5290 - val_pre_intent_loss: 0.2668 - val_pre_ner_loss: 0.2622 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9320\n",
      "Epoch 45/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.3547 - pre_intent_loss: 0.1083 - pre_ner_loss: 0.2464 - pre_intent_accuracy: 0.9879 - pre_ner_accuracy: 0.9326 - val_loss: 0.5098 - val_pre_intent_loss: 0.2560 - val_pre_ner_loss: 0.2538 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9333\n",
      "Epoch 46/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3463 - pre_intent_loss: 0.1081 - pre_ner_loss: 0.2382 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9350 - val_loss: 0.5161 - val_pre_intent_loss: 0.2609 - val_pre_ner_loss: 0.2551 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9357\n",
      "Epoch 47/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.3360 - pre_intent_loss: 0.0989 - pre_ner_loss: 0.2371 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9352 - val_loss: 0.5063 - val_pre_intent_loss: 0.2648 - val_pre_ner_loss: 0.2415 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9341\n",
      "Epoch 48/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.3323 - pre_intent_loss: 0.0957 - pre_ner_loss: 0.2366 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9345 - val_loss: 0.5263 - val_pre_intent_loss: 0.2663 - val_pre_ner_loss: 0.2599 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9365\n",
      "Epoch 49/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3328 - pre_intent_loss: 0.0982 - pre_ner_loss: 0.2346 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9376 - val_loss: 0.4954 - val_pre_intent_loss: 0.2517 - val_pre_ner_loss: 0.2437 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9349\n",
      "Epoch 50/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.3263 - pre_intent_loss: 0.0940 - pre_ner_loss: 0.2323 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9353 - val_loss: 0.5143 - val_pre_intent_loss: 0.2594 - val_pre_ner_loss: 0.2549 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9341\n",
      "Epoch 51/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.3139 - pre_intent_loss: 0.0876 - pre_ner_loss: 0.2264 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9381 - val_loss: 0.4915 - val_pre_intent_loss: 0.2535 - val_pre_ner_loss: 0.2380 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9393\n",
      "Epoch 52/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.3139 - pre_intent_loss: 0.0906 - pre_ner_loss: 0.2233 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9392 - val_loss: 0.4823 - val_pre_intent_loss: 0.2388 - val_pre_ner_loss: 0.2434 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9326\n",
      "Epoch 53/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3160 - pre_intent_loss: 0.0899 - pre_ner_loss: 0.2261 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9372 - val_loss: 0.4897 - val_pre_intent_loss: 0.2467 - val_pre_ner_loss: 0.2430 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9372\n",
      "Epoch 54/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3068 - pre_intent_loss: 0.0883 - pre_ner_loss: 0.2185 - pre_intent_accuracy: 0.9893 - pre_ner_accuracy: 0.9383 - val_loss: 0.4723 - val_pre_intent_loss: 0.2427 - val_pre_ner_loss: 0.2296 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9391\n",
      "Epoch 55/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.2945 - pre_intent_loss: 0.0811 - pre_ner_loss: 0.2134 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9402 - val_loss: 0.4749 - val_pre_intent_loss: 0.2447 - val_pre_ner_loss: 0.2301 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9354\n",
      "Epoch 56/200\n",
      "35/35 [==============================] - 0s 10ms/step - loss: 0.2918 - pre_intent_loss: 0.0802 - pre_ner_loss: 0.2116 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9376 - val_loss: 0.4868 - val_pre_intent_loss: 0.2446 - val_pre_ner_loss: 0.2422 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9344\n",
      "Epoch 57/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.2961 - pre_intent_loss: 0.0831 - pre_ner_loss: 0.2130 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9420 - val_loss: 0.4790 - val_pre_intent_loss: 0.2498 - val_pre_ner_loss: 0.2292 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9401\n",
      "Epoch 58/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.2915 - pre_intent_loss: 0.0776 - pre_ner_loss: 0.2139 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9398 - val_loss: 0.4807 - val_pre_intent_loss: 0.2376 - val_pre_ner_loss: 0.2432 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9385\n",
      "Epoch 59/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2868 - pre_intent_loss: 0.0754 - pre_ner_loss: 0.2114 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9419 - val_loss: 0.5318 - val_pre_intent_loss: 0.2741 - val_pre_ner_loss: 0.2577 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9331\n",
      "Epoch 60/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.3023 - pre_intent_loss: 0.0807 - pre_ner_loss: 0.2216 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9375 - val_loss: 0.4853 - val_pre_intent_loss: 0.2453 - val_pre_ner_loss: 0.2400 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9370\n",
      "Epoch 61/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.3097 - pre_intent_loss: 0.0882 - pre_ner_loss: 0.2215 - pre_intent_accuracy: 0.9893 - pre_ner_accuracy: 0.9371 - val_loss: 0.5257 - val_pre_intent_loss: 0.2664 - val_pre_ner_loss: 0.2593 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9354\n",
      "Epoch 62/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.3056 - pre_intent_loss: 0.0815 - pre_ner_loss: 0.2241 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9359 - val_loss: 0.4693 - val_pre_intent_loss: 0.2287 - val_pre_ner_loss: 0.2406 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9378\n",
      "Epoch 63/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.3034 - pre_intent_loss: 0.0781 - pre_ner_loss: 0.2252 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9372 - val_loss: 0.4862 - val_pre_intent_loss: 0.2421 - val_pre_ner_loss: 0.2441 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9349\n",
      "Epoch 64/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.2892 - pre_intent_loss: 0.0769 - pre_ner_loss: 0.2123 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9386 - val_loss: 0.4629 - val_pre_intent_loss: 0.2411 - val_pre_ner_loss: 0.2218 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9419\n",
      "Epoch 65/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2825 - pre_intent_loss: 0.0774 - pre_ner_loss: 0.2051 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9425 - val_loss: 0.4744 - val_pre_intent_loss: 0.2427 - val_pre_ner_loss: 0.2317 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9370\n",
      "Epoch 66/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.2785 - pre_intent_loss: 0.0706 - pre_ner_loss: 0.2079 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9411 - val_loss: 0.4488 - val_pre_intent_loss: 0.2283 - val_pre_ner_loss: 0.2204 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9401\n",
      "Epoch 67/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2685 - pre_intent_loss: 0.0711 - pre_ner_loss: 0.1974 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9423 - val_loss: 0.4633 - val_pre_intent_loss: 0.2397 - val_pre_ner_loss: 0.2236 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9414\n",
      "Epoch 68/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2596 - pre_intent_loss: 0.0661 - pre_ner_loss: 0.1935 - pre_intent_accuracy: 0.9893 - pre_ner_accuracy: 0.9437 - val_loss: 0.4506 - val_pre_intent_loss: 0.2372 - val_pre_ner_loss: 0.2133 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 69/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2626 - pre_intent_loss: 0.0633 - pre_ner_loss: 0.1993 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9376 - val_loss: 0.4905 - val_pre_intent_loss: 0.2597 - val_pre_ner_loss: 0.2309 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9396\n",
      "Epoch 70/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2649 - pre_intent_loss: 0.0655 - pre_ner_loss: 0.1994 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9440 - val_loss: 0.4757 - val_pre_intent_loss: 0.2405 - val_pre_ner_loss: 0.2352 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9370\n",
      "Epoch 71/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2759 - pre_intent_loss: 0.0671 - pre_ner_loss: 0.2088 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9377 - val_loss: 0.4894 - val_pre_intent_loss: 0.2486 - val_pre_ner_loss: 0.2408 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9404\n",
      "Epoch 72/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.2793 - pre_intent_loss: 0.0734 - pre_ner_loss: 0.2059 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9426 - val_loss: 0.4536 - val_pre_intent_loss: 0.2260 - val_pre_ner_loss: 0.2276 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9391\n",
      "Epoch 73/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.2753 - pre_intent_loss: 0.0669 - pre_ner_loss: 0.2084 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9369 - val_loss: 0.4654 - val_pre_intent_loss: 0.2441 - val_pre_ner_loss: 0.2213 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9393\n",
      "Epoch 74/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.2721 - pre_intent_loss: 0.0681 - pre_ner_loss: 0.2040 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9414 - val_loss: 0.4670 - val_pre_intent_loss: 0.2201 - val_pre_ner_loss: 0.2468 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9266\n",
      "Epoch 75/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2642 - pre_intent_loss: 0.0624 - pre_ner_loss: 0.2018 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9415 - val_loss: 0.4353 - val_pre_intent_loss: 0.2199 - val_pre_ner_loss: 0.2155 - val_pre_intent_accuracy: 0.9635 - val_pre_ner_accuracy: 0.9414\n",
      "Epoch 76/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.2647 - pre_intent_loss: 0.0632 - pre_ner_loss: 0.2015 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9401 - val_loss: 0.4666 - val_pre_intent_loss: 0.2326 - val_pre_ner_loss: 0.2340 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9372\n",
      "Epoch 77/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2625 - pre_intent_loss: 0.0601 - pre_ner_loss: 0.2024 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9410 - val_loss: 0.4481 - val_pre_intent_loss: 0.2307 - val_pre_ner_loss: 0.2174 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9391\n",
      "Epoch 78/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2583 - pre_intent_loss: 0.0578 - pre_ner_loss: 0.2005 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9401 - val_loss: 0.4753 - val_pre_intent_loss: 0.2548 - val_pre_ner_loss: 0.2205 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9370\n",
      "Epoch 79/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2517 - pre_intent_loss: 0.0597 - pre_ner_loss: 0.1920 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9429 - val_loss: 0.4421 - val_pre_intent_loss: 0.2190 - val_pre_ner_loss: 0.2231 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9404\n",
      "Epoch 80/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.2467 - pre_intent_loss: 0.0567 - pre_ner_loss: 0.1900 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9422 - val_loss: 0.4312 - val_pre_intent_loss: 0.2250 - val_pre_ner_loss: 0.2062 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 81/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2488 - pre_intent_loss: 0.0581 - pre_ner_loss: 0.1907 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9446 - val_loss: 0.4574 - val_pre_intent_loss: 0.2318 - val_pre_ner_loss: 0.2256 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9406\n",
      "Epoch 82/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.2403 - pre_intent_loss: 0.0566 - pre_ner_loss: 0.1837 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9460 - val_loss: 0.4102 - val_pre_intent_loss: 0.2029 - val_pre_ner_loss: 0.2072 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 83/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.2354 - pre_intent_loss: 0.0542 - pre_ner_loss: 0.1812 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9458 - val_loss: 0.4195 - val_pre_intent_loss: 0.2050 - val_pre_ner_loss: 0.2145 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 84/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.2356 - pre_intent_loss: 0.0519 - pre_ner_loss: 0.1837 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9459 - val_loss: 0.4141 - val_pre_intent_loss: 0.2042 - val_pre_ner_loss: 0.2099 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9419\n",
      "Epoch 85/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2304 - pre_intent_loss: 0.0491 - pre_ner_loss: 0.1813 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9463 - val_loss: 0.4240 - val_pre_intent_loss: 0.2204 - val_pre_ner_loss: 0.2036 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9398\n",
      "Epoch 86/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2227 - pre_intent_loss: 0.0496 - pre_ner_loss: 0.1730 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9468 - val_loss: 0.4501 - val_pre_intent_loss: 0.2356 - val_pre_ner_loss: 0.2145 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9409\n",
      "Epoch 87/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.2248 - pre_intent_loss: 0.0506 - pre_ner_loss: 0.1743 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9476 - val_loss: 0.4015 - val_pre_intent_loss: 0.2060 - val_pre_ner_loss: 0.1955 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9453\n",
      "Epoch 88/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.2214 - pre_intent_loss: 0.0461 - pre_ner_loss: 0.1752 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9485 - val_loss: 0.4398 - val_pre_intent_loss: 0.2390 - val_pre_ner_loss: 0.2009 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9414\n",
      "Epoch 89/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.2184 - pre_intent_loss: 0.0499 - pre_ner_loss: 0.1686 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9484 - val_loss: 0.4198 - val_pre_intent_loss: 0.2144 - val_pre_ner_loss: 0.2054 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9417\n",
      "Epoch 90/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2176 - pre_intent_loss: 0.0465 - pre_ner_loss: 0.1710 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9486 - val_loss: 0.4197 - val_pre_intent_loss: 0.2074 - val_pre_ner_loss: 0.2123 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9396\n",
      "Epoch 91/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2305 - pre_intent_loss: 0.0480 - pre_ner_loss: 0.1825 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9423 - val_loss: 0.4774 - val_pre_intent_loss: 0.2285 - val_pre_ner_loss: 0.2490 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9305\n",
      "Epoch 92/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.2459 - pre_intent_loss: 0.0569 - pre_ner_loss: 0.1891 - pre_intent_accuracy: 0.9888 - pre_ner_accuracy: 0.9443 - val_loss: 0.4544 - val_pre_intent_loss: 0.2242 - val_pre_ner_loss: 0.2302 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9388\n",
      "Epoch 93/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2525 - pre_intent_loss: 0.0534 - pre_ner_loss: 0.1991 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9362 - val_loss: 0.4263 - val_pre_intent_loss: 0.2114 - val_pre_ner_loss: 0.2149 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9409\n",
      "Epoch 94/200\n",
      "35/35 [==============================] - 1s 23ms/step - loss: 0.2504 - pre_intent_loss: 0.0538 - pre_ner_loss: 0.1966 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9411 - val_loss: 0.5147 - val_pre_intent_loss: 0.2538 - val_pre_ner_loss: 0.2610 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9211\n",
      "Epoch 95/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.2528 - pre_intent_loss: 0.0539 - pre_ner_loss: 0.1989 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9400 - val_loss: 0.4533 - val_pre_intent_loss: 0.2345 - val_pre_ner_loss: 0.2188 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9378\n",
      "Epoch 96/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2558 - pre_intent_loss: 0.0621 - pre_ner_loss: 0.1937 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9411 - val_loss: 0.4893 - val_pre_intent_loss: 0.2521 - val_pre_ner_loss: 0.2372 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9331\n",
      "Epoch 97/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.2677 - pre_intent_loss: 0.0583 - pre_ner_loss: 0.2094 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9350 - val_loss: 0.4594 - val_pre_intent_loss: 0.2329 - val_pre_ner_loss: 0.2266 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9365\n",
      "Epoch 98/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.2551 - pre_intent_loss: 0.0557 - pre_ner_loss: 0.1993 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9420 - val_loss: 0.4566 - val_pre_intent_loss: 0.2331 - val_pre_ner_loss: 0.2235 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9352\n",
      "Epoch 99/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.2329 - pre_intent_loss: 0.0499 - pre_ner_loss: 0.1829 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9413 - val_loss: 0.4112 - val_pre_intent_loss: 0.2190 - val_pre_ner_loss: 0.1922 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9458\n",
      "Epoch 100/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2131 - pre_intent_loss: 0.0453 - pre_ner_loss: 0.1678 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9474 - val_loss: 0.4167 - val_pre_intent_loss: 0.2236 - val_pre_ner_loss: 0.1932 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9445\n",
      "Epoch 101/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2051 - pre_intent_loss: 0.0403 - pre_ner_loss: 0.1648 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9459 - val_loss: 0.4053 - val_pre_intent_loss: 0.2136 - val_pre_ner_loss: 0.1916 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9417\n",
      "Epoch 102/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2033 - pre_intent_loss: 0.0400 - pre_ner_loss: 0.1634 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9489 - val_loss: 0.4218 - val_pre_intent_loss: 0.2083 - val_pre_ner_loss: 0.2135 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9378\n",
      "Epoch 103/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.2015 - pre_intent_loss: 0.0391 - pre_ner_loss: 0.1624 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9491 - val_loss: 0.3932 - val_pre_intent_loss: 0.2099 - val_pre_ner_loss: 0.1833 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9474\n",
      "Epoch 104/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2024 - pre_intent_loss: 0.0421 - pre_ner_loss: 0.1604 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9498 - val_loss: 0.3822 - val_pre_intent_loss: 0.1886 - val_pre_ner_loss: 0.1936 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9432\n",
      "Epoch 105/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1960 - pre_intent_loss: 0.0387 - pre_ner_loss: 0.1573 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9512 - val_loss: 0.4076 - val_pre_intent_loss: 0.2241 - val_pre_ner_loss: 0.1834 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 106/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1865 - pre_intent_loss: 0.0366 - pre_ner_loss: 0.1499 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9524 - val_loss: 0.4089 - val_pre_intent_loss: 0.2247 - val_pre_ner_loss: 0.1842 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9456\n",
      "Epoch 107/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1851 - pre_intent_loss: 0.0372 - pre_ner_loss: 0.1479 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9527 - val_loss: 0.3823 - val_pre_intent_loss: 0.2062 - val_pre_ner_loss: 0.1761 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 108/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1828 - pre_intent_loss: 0.0349 - pre_ner_loss: 0.1479 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9543 - val_loss: 0.4092 - val_pre_intent_loss: 0.2169 - val_pre_ner_loss: 0.1923 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9471\n",
      "Epoch 109/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1822 - pre_intent_loss: 0.0351 - pre_ner_loss: 0.1471 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9516 - val_loss: 0.3959 - val_pre_intent_loss: 0.2142 - val_pre_ner_loss: 0.1817 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9438\n",
      "Epoch 110/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.1863 - pre_intent_loss: 0.0354 - pre_ner_loss: 0.1510 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9519 - val_loss: 0.4004 - val_pre_intent_loss: 0.2062 - val_pre_ner_loss: 0.1943 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9456\n",
      "Epoch 111/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1879 - pre_intent_loss: 0.0361 - pre_ner_loss: 0.1518 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9517 - val_loss: 0.3931 - val_pre_intent_loss: 0.2019 - val_pre_ner_loss: 0.1911 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 112/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1907 - pre_intent_loss: 0.0358 - pre_ner_loss: 0.1549 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9495 - val_loss: 0.3958 - val_pre_intent_loss: 0.2008 - val_pre_ner_loss: 0.1950 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9430\n",
      "Epoch 113/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1908 - pre_intent_loss: 0.0378 - pre_ner_loss: 0.1530 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9521 - val_loss: 0.3915 - val_pre_intent_loss: 0.2016 - val_pre_ner_loss: 0.1899 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9458\n",
      "Epoch 114/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1933 - pre_intent_loss: 0.0365 - pre_ner_loss: 0.1568 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9509 - val_loss: 0.4074 - val_pre_intent_loss: 0.2101 - val_pre_ner_loss: 0.1974 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9404\n",
      "Epoch 115/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.1966 - pre_intent_loss: 0.0375 - pre_ner_loss: 0.1591 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9466 - val_loss: 0.3993 - val_pre_intent_loss: 0.2006 - val_pre_ner_loss: 0.1987 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9430\n",
      "Epoch 116/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.2019 - pre_intent_loss: 0.0355 - pre_ner_loss: 0.1665 - pre_intent_accuracy: 0.9937 - pre_ner_accuracy: 0.9475 - val_loss: 0.4049 - val_pre_intent_loss: 0.2106 - val_pre_ner_loss: 0.1943 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9419\n",
      "Epoch 117/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2137 - pre_intent_loss: 0.0411 - pre_ner_loss: 0.1726 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9464 - val_loss: 0.4385 - val_pre_intent_loss: 0.2152 - val_pre_ner_loss: 0.2233 - val_pre_intent_accuracy: 0.9583 - val_pre_ner_accuracy: 0.9406\n",
      "Epoch 118/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.2228 - pre_intent_loss: 0.0485 - pre_ner_loss: 0.1743 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9463 - val_loss: 0.4377 - val_pre_intent_loss: 0.2221 - val_pre_ner_loss: 0.2156 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9401\n",
      "Epoch 119/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2239 - pre_intent_loss: 0.0461 - pre_ner_loss: 0.1778 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9435 - val_loss: 0.4704 - val_pre_intent_loss: 0.2417 - val_pre_ner_loss: 0.2287 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9365\n",
      "Epoch 120/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.2175 - pre_intent_loss: 0.0448 - pre_ner_loss: 0.1727 - pre_intent_accuracy: 0.9897 - pre_ner_accuracy: 0.9452 - val_loss: 0.4066 - val_pre_intent_loss: 0.2088 - val_pre_ner_loss: 0.1978 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9422\n",
      "Epoch 121/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.2118 - pre_intent_loss: 0.0411 - pre_ner_loss: 0.1707 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9467 - val_loss: 0.3762 - val_pre_intent_loss: 0.1818 - val_pre_ner_loss: 0.1944 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9411\n",
      "Epoch 122/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.2043 - pre_intent_loss: 0.0353 - pre_ner_loss: 0.1690 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9452 - val_loss: 0.3795 - val_pre_intent_loss: 0.1889 - val_pre_ner_loss: 0.1906 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9453\n",
      "Epoch 123/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2017 - pre_intent_loss: 0.0363 - pre_ner_loss: 0.1654 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9487 - val_loss: 0.4190 - val_pre_intent_loss: 0.2118 - val_pre_ner_loss: 0.2071 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9414\n",
      "Epoch 124/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.2038 - pre_intent_loss: 0.0379 - pre_ner_loss: 0.1659 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9491 - val_loss: 0.4016 - val_pre_intent_loss: 0.2174 - val_pre_ner_loss: 0.1842 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9417\n",
      "Epoch 125/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1841 - pre_intent_loss: 0.0337 - pre_ner_loss: 0.1504 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9503 - val_loss: 0.4014 - val_pre_intent_loss: 0.2263 - val_pre_ner_loss: 0.1751 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9453\n",
      "Epoch 126/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1782 - pre_intent_loss: 0.0310 - pre_ner_loss: 0.1472 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9505 - val_loss: 0.3851 - val_pre_intent_loss: 0.2082 - val_pre_ner_loss: 0.1768 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9458\n",
      "Epoch 127/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1746 - pre_intent_loss: 0.0302 - pre_ner_loss: 0.1443 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9543 - val_loss: 0.3860 - val_pre_intent_loss: 0.1988 - val_pre_ner_loss: 0.1872 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9469\n",
      "Epoch 128/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1734 - pre_intent_loss: 0.0308 - pre_ner_loss: 0.1426 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9536 - val_loss: 0.3789 - val_pre_intent_loss: 0.1942 - val_pre_ner_loss: 0.1846 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9464\n",
      "Epoch 129/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1771 - pre_intent_loss: 0.0291 - pre_ner_loss: 0.1480 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9479 - val_loss: 0.3861 - val_pre_intent_loss: 0.2020 - val_pre_ner_loss: 0.1841 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9469\n",
      "Epoch 130/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1837 - pre_intent_loss: 0.0316 - pre_ner_loss: 0.1521 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9529 - val_loss: 0.4176 - val_pre_intent_loss: 0.2062 - val_pre_ner_loss: 0.2114 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9292\n",
      "Epoch 131/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1773 - pre_intent_loss: 0.0311 - pre_ner_loss: 0.1462 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9531 - val_loss: 0.3920 - val_pre_intent_loss: 0.2132 - val_pre_ner_loss: 0.1788 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9464\n",
      "Epoch 132/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1698 - pre_intent_loss: 0.0313 - pre_ner_loss: 0.1385 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9538 - val_loss: 0.3695 - val_pre_intent_loss: 0.1982 - val_pre_ner_loss: 0.1713 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9482\n",
      "Epoch 133/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1669 - pre_intent_loss: 0.0283 - pre_ner_loss: 0.1386 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9542 - val_loss: 0.3808 - val_pre_intent_loss: 0.2045 - val_pre_ner_loss: 0.1763 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9477\n",
      "Epoch 134/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1653 - pre_intent_loss: 0.0279 - pre_ner_loss: 0.1374 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9539 - val_loss: 0.3945 - val_pre_intent_loss: 0.2237 - val_pre_ner_loss: 0.1708 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9495\n",
      "Epoch 135/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1630 - pre_intent_loss: 0.0280 - pre_ner_loss: 0.1350 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9528 - val_loss: 0.3639 - val_pre_intent_loss: 0.1927 - val_pre_ner_loss: 0.1711 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9469\n",
      "Epoch 136/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1672 - pre_intent_loss: 0.0273 - pre_ner_loss: 0.1400 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9553 - val_loss: 0.3992 - val_pre_intent_loss: 0.2208 - val_pre_ner_loss: 0.1784 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9487\n",
      "Epoch 137/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.1647 - pre_intent_loss: 0.0283 - pre_ner_loss: 0.1364 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9543 - val_loss: 0.4050 - val_pre_intent_loss: 0.2227 - val_pre_ner_loss: 0.1823 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9440\n",
      "Epoch 138/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.1679 - pre_intent_loss: 0.0271 - pre_ner_loss: 0.1408 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9540 - val_loss: 0.3917 - val_pre_intent_loss: 0.2087 - val_pre_ner_loss: 0.1830 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9456\n",
      "Epoch 139/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1833 - pre_intent_loss: 0.0288 - pre_ner_loss: 0.1545 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9496 - val_loss: 0.4135 - val_pre_intent_loss: 0.2191 - val_pre_ner_loss: 0.1944 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9406\n",
      "Epoch 140/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1839 - pre_intent_loss: 0.0315 - pre_ner_loss: 0.1524 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9499 - val_loss: 0.4069 - val_pre_intent_loss: 0.2060 - val_pre_ner_loss: 0.2009 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9404\n",
      "Epoch 141/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1874 - pre_intent_loss: 0.0318 - pre_ner_loss: 0.1556 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9482 - val_loss: 0.4045 - val_pre_intent_loss: 0.2240 - val_pre_ner_loss: 0.1805 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9448\n",
      "Epoch 142/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1846 - pre_intent_loss: 0.0294 - pre_ner_loss: 0.1552 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9438 - val_loss: 0.4104 - val_pre_intent_loss: 0.2108 - val_pre_ner_loss: 0.1995 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 143/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1931 - pre_intent_loss: 0.0332 - pre_ner_loss: 0.1599 - pre_intent_accuracy: 0.9929 - pre_ner_accuracy: 0.9492 - val_loss: 0.4083 - val_pre_intent_loss: 0.2070 - val_pre_ner_loss: 0.2013 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9378\n",
      "Epoch 144/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1982 - pre_intent_loss: 0.0303 - pre_ner_loss: 0.1679 - pre_intent_accuracy: 0.9951 - pre_ner_accuracy: 0.9432 - val_loss: 0.4644 - val_pre_intent_loss: 0.2536 - val_pre_ner_loss: 0.2108 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9365\n",
      "Epoch 145/200\n",
      "35/35 [==============================] - 1s 24ms/step - loss: 0.1941 - pre_intent_loss: 0.0421 - pre_ner_loss: 0.1520 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9501 - val_loss: 0.4047 - val_pre_intent_loss: 0.2156 - val_pre_ner_loss: 0.1891 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9432\n",
      "Epoch 146/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1836 - pre_intent_loss: 0.0316 - pre_ner_loss: 0.1520 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9509 - val_loss: 0.4208 - val_pre_intent_loss: 0.2121 - val_pre_ner_loss: 0.2087 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9385\n",
      "Epoch 147/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.1860 - pre_intent_loss: 0.0279 - pre_ner_loss: 0.1581 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9446 - val_loss: 0.4356 - val_pre_intent_loss: 0.2244 - val_pre_ner_loss: 0.2112 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9385\n",
      "Epoch 148/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1788 - pre_intent_loss: 0.0295 - pre_ner_loss: 0.1494 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9488 - val_loss: 0.3950 - val_pre_intent_loss: 0.2006 - val_pre_ner_loss: 0.1943 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9432\n",
      "Epoch 149/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1783 - pre_intent_loss: 0.0282 - pre_ner_loss: 0.1501 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9505 - val_loss: 0.3897 - val_pre_intent_loss: 0.1910 - val_pre_ner_loss: 0.1987 - val_pre_intent_accuracy: 0.9531 - val_pre_ner_accuracy: 0.9362\n",
      "Epoch 150/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.1687 - pre_intent_loss: 0.0263 - pre_ner_loss: 0.1424 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9527 - val_loss: 0.4308 - val_pre_intent_loss: 0.2416 - val_pre_ner_loss: 0.1892 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9424\n",
      "Epoch 151/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.1742 - pre_intent_loss: 0.0286 - pre_ner_loss: 0.1455 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9508 - val_loss: 0.3924 - val_pre_intent_loss: 0.2093 - val_pre_ner_loss: 0.1831 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9453\n",
      "Epoch 152/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1686 - pre_intent_loss: 0.0251 - pre_ner_loss: 0.1435 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9479 - val_loss: 0.3804 - val_pre_intent_loss: 0.1996 - val_pre_ner_loss: 0.1808 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9409\n",
      "Epoch 153/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.1654 - pre_intent_loss: 0.0259 - pre_ner_loss: 0.1395 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9527 - val_loss: 0.3620 - val_pre_intent_loss: 0.1864 - val_pre_ner_loss: 0.1756 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9464\n",
      "Epoch 154/200\n",
      "35/35 [==============================] - 1s 14ms/step - loss: 0.1588 - pre_intent_loss: 0.0243 - pre_ner_loss: 0.1345 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9538 - val_loss: 0.4027 - val_pre_intent_loss: 0.2275 - val_pre_ner_loss: 0.1751 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9492\n",
      "Epoch 155/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1560 - pre_intent_loss: 0.0248 - pre_ner_loss: 0.1313 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9552 - val_loss: 0.3778 - val_pre_intent_loss: 0.2023 - val_pre_ner_loss: 0.1755 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9448\n",
      "Epoch 156/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1521 - pre_intent_loss: 0.0228 - pre_ner_loss: 0.1293 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9552 - val_loss: 0.3951 - val_pre_intent_loss: 0.2273 - val_pre_ner_loss: 0.1679 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9471\n",
      "Epoch 157/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1472 - pre_intent_loss: 0.0226 - pre_ner_loss: 0.1246 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9563 - val_loss: 0.3867 - val_pre_intent_loss: 0.2180 - val_pre_ner_loss: 0.1687 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 158/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.1473 - pre_intent_loss: 0.0232 - pre_ner_loss: 0.1241 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9567 - val_loss: 0.3828 - val_pre_intent_loss: 0.2209 - val_pre_ner_loss: 0.1619 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9521\n",
      "Epoch 159/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.1426 - pre_intent_loss: 0.0220 - pre_ner_loss: 0.1206 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9575 - val_loss: 0.3935 - val_pre_intent_loss: 0.2243 - val_pre_ner_loss: 0.1692 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9471\n",
      "Epoch 160/200\n",
      "35/35 [==============================] - 0s 14ms/step - loss: 0.1429 - pre_intent_loss: 0.0211 - pre_ner_loss: 0.1218 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9577 - val_loss: 0.3883 - val_pre_intent_loss: 0.2198 - val_pre_ner_loss: 0.1685 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9490\n",
      "Epoch 161/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1482 - pre_intent_loss: 0.0221 - pre_ner_loss: 0.1261 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9551 - val_loss: 0.3646 - val_pre_intent_loss: 0.1907 - val_pre_ner_loss: 0.1738 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9456\n",
      "Epoch 162/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1456 - pre_intent_loss: 0.0228 - pre_ner_loss: 0.1228 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9576 - val_loss: 0.3964 - val_pre_intent_loss: 0.2209 - val_pre_ner_loss: 0.1755 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9451\n",
      "Epoch 163/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1441 - pre_intent_loss: 0.0220 - pre_ner_loss: 0.1220 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9576 - val_loss: 0.4271 - val_pre_intent_loss: 0.2428 - val_pre_ner_loss: 0.1843 - val_pre_intent_accuracy: 0.9479 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 164/200\n",
      "35/35 [==============================] - 1s 14ms/step - loss: 0.1546 - pre_intent_loss: 0.0228 - pre_ner_loss: 0.1318 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9568 - val_loss: 0.4123 - val_pre_intent_loss: 0.2351 - val_pre_ner_loss: 0.1773 - val_pre_intent_accuracy: 0.9219 - val_pre_ner_accuracy: 0.9451\n",
      "Epoch 165/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1492 - pre_intent_loss: 0.0228 - pre_ner_loss: 0.1264 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9555 - val_loss: 0.4211 - val_pre_intent_loss: 0.2361 - val_pre_ner_loss: 0.1851 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9357\n",
      "Epoch 166/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1507 - pre_intent_loss: 0.0230 - pre_ner_loss: 0.1277 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9559 - val_loss: 0.4140 - val_pre_intent_loss: 0.2315 - val_pre_ner_loss: 0.1825 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9451\n",
      "Epoch 167/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1581 - pre_intent_loss: 0.0252 - pre_ner_loss: 0.1329 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9556 - val_loss: 0.4029 - val_pre_intent_loss: 0.2310 - val_pre_ner_loss: 0.1720 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9466\n",
      "Epoch 168/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1468 - pre_intent_loss: 0.0220 - pre_ner_loss: 0.1248 - pre_intent_accuracy: 0.9937 - pre_ner_accuracy: 0.9565 - val_loss: 0.4200 - val_pre_intent_loss: 0.2385 - val_pre_ner_loss: 0.1815 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9445\n",
      "Epoch 169/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1457 - pre_intent_loss: 0.0218 - pre_ner_loss: 0.1239 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9559 - val_loss: 0.4226 - val_pre_intent_loss: 0.2416 - val_pre_ner_loss: 0.1809 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9438\n",
      "Epoch 170/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1485 - pre_intent_loss: 0.0227 - pre_ner_loss: 0.1258 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9569 - val_loss: 0.4063 - val_pre_intent_loss: 0.2273 - val_pre_ner_loss: 0.1790 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9466\n",
      "Epoch 171/200\n",
      "35/35 [==============================] - 1s 19ms/step - loss: 0.1479 - pre_intent_loss: 0.0220 - pre_ner_loss: 0.1259 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9558 - val_loss: 0.4022 - val_pre_intent_loss: 0.2303 - val_pre_ner_loss: 0.1718 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9466\n",
      "Epoch 172/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1529 - pre_intent_loss: 0.0221 - pre_ner_loss: 0.1309 - pre_intent_accuracy: 0.9942 - pre_ner_accuracy: 0.9540 - val_loss: 0.4418 - val_pre_intent_loss: 0.2513 - val_pre_ner_loss: 0.1904 - val_pre_intent_accuracy: 0.9219 - val_pre_ner_accuracy: 0.9461\n",
      "Epoch 173/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1648 - pre_intent_loss: 0.0259 - pre_ner_loss: 0.1389 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9526 - val_loss: 0.4064 - val_pre_intent_loss: 0.2218 - val_pre_ner_loss: 0.1846 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9440\n",
      "Epoch 174/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1622 - pre_intent_loss: 0.0245 - pre_ner_loss: 0.1377 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9516 - val_loss: 0.4361 - val_pre_intent_loss: 0.2410 - val_pre_ner_loss: 0.1950 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9391\n",
      "Epoch 175/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1540 - pre_intent_loss: 0.0244 - pre_ner_loss: 0.1296 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9548 - val_loss: 0.4277 - val_pre_intent_loss: 0.2550 - val_pre_ner_loss: 0.1727 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9484\n",
      "Epoch 176/200\n",
      "35/35 [==============================] - 0s 13ms/step - loss: 0.1477 - pre_intent_loss: 0.0210 - pre_ner_loss: 0.1267 - pre_intent_accuracy: 0.9946 - pre_ner_accuracy: 0.9561 - val_loss: 0.4039 - val_pre_intent_loss: 0.2328 - val_pre_ner_loss: 0.1712 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9477\n",
      "Epoch 177/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1408 - pre_intent_loss: 0.0198 - pre_ner_loss: 0.1211 - pre_intent_accuracy: 0.9946 - pre_ner_accuracy: 0.9565 - val_loss: 0.4129 - val_pre_intent_loss: 0.2443 - val_pre_ner_loss: 0.1686 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 178/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1394 - pre_intent_loss: 0.0206 - pre_ner_loss: 0.1187 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9571 - val_loss: 0.3797 - val_pre_intent_loss: 0.2164 - val_pre_ner_loss: 0.1633 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9497\n",
      "Epoch 179/200\n",
      "35/35 [==============================] - 1s 21ms/step - loss: 0.1322 - pre_intent_loss: 0.0190 - pre_ner_loss: 0.1132 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9588 - val_loss: 0.3782 - val_pre_intent_loss: 0.2189 - val_pre_ner_loss: 0.1593 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9497\n",
      "Epoch 180/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1285 - pre_intent_loss: 0.0187 - pre_ner_loss: 0.1099 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9594 - val_loss: 0.3864 - val_pre_intent_loss: 0.2261 - val_pre_ner_loss: 0.1603 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9518\n",
      "Epoch 181/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1256 - pre_intent_loss: 0.0179 - pre_ner_loss: 0.1077 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9597 - val_loss: 0.3920 - val_pre_intent_loss: 0.2264 - val_pre_ner_loss: 0.1656 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9448\n",
      "Epoch 182/200\n",
      "35/35 [==============================] - 1s 17ms/step - loss: 0.1256 - pre_intent_loss: 0.0183 - pre_ner_loss: 0.1073 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9604 - val_loss: 0.3865 - val_pre_intent_loss: 0.2315 - val_pre_ner_loss: 0.1550 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9510\n",
      "Epoch 183/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1246 - pre_intent_loss: 0.0175 - pre_ner_loss: 0.1070 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9601 - val_loss: 0.3846 - val_pre_intent_loss: 0.2199 - val_pre_ner_loss: 0.1647 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9474\n",
      "Epoch 184/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1276 - pre_intent_loss: 0.0173 - pre_ner_loss: 0.1104 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9600 - val_loss: 0.4002 - val_pre_intent_loss: 0.2329 - val_pre_ner_loss: 0.1673 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 185/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1292 - pre_intent_loss: 0.0185 - pre_ner_loss: 0.1108 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9596 - val_loss: 0.3815 - val_pre_intent_loss: 0.2084 - val_pre_ner_loss: 0.1730 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9456\n",
      "Epoch 186/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1306 - pre_intent_loss: 0.0180 - pre_ner_loss: 0.1127 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9587 - val_loss: 0.4084 - val_pre_intent_loss: 0.2395 - val_pre_ner_loss: 0.1689 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9487\n",
      "Epoch 187/200\n",
      "35/35 [==============================] - 1s 22ms/step - loss: 0.1326 - pre_intent_loss: 0.0189 - pre_ner_loss: 0.1137 - pre_intent_accuracy: 0.9902 - pre_ner_accuracy: 0.9581 - val_loss: 0.4200 - val_pre_intent_loss: 0.2499 - val_pre_ner_loss: 0.1701 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9479\n",
      "Epoch 188/200\n",
      "35/35 [==============================] - 1s 18ms/step - loss: 0.1323 - pre_intent_loss: 0.0182 - pre_ner_loss: 0.1141 - pre_intent_accuracy: 0.9933 - pre_ner_accuracy: 0.9575 - val_loss: 0.4151 - val_pre_intent_loss: 0.2392 - val_pre_ner_loss: 0.1759 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9497\n",
      "Epoch 189/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1332 - pre_intent_loss: 0.0180 - pre_ner_loss: 0.1152 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9582 - val_loss: 0.4105 - val_pre_intent_loss: 0.2210 - val_pre_ner_loss: 0.1895 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9333\n",
      "Epoch 190/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1345 - pre_intent_loss: 0.0185 - pre_ner_loss: 0.1159 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9585 - val_loss: 0.4209 - val_pre_intent_loss: 0.2462 - val_pre_ner_loss: 0.1747 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9490\n",
      "Epoch 191/200\n",
      "35/35 [==============================] - 1s 16ms/step - loss: 0.1359 - pre_intent_loss: 0.0193 - pre_ner_loss: 0.1166 - pre_intent_accuracy: 0.9906 - pre_ner_accuracy: 0.9585 - val_loss: 0.4190 - val_pre_intent_loss: 0.2336 - val_pre_ner_loss: 0.1854 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9432\n",
      "Epoch 192/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1342 - pre_intent_loss: 0.0182 - pre_ner_loss: 0.1160 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9582 - val_loss: 0.4020 - val_pre_intent_loss: 0.2379 - val_pre_ner_loss: 0.1640 - val_pre_intent_accuracy: 0.9219 - val_pre_ner_accuracy: 0.9458\n",
      "Epoch 193/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1336 - pre_intent_loss: 0.0190 - pre_ner_loss: 0.1146 - pre_intent_accuracy: 0.9911 - pre_ner_accuracy: 0.9571 - val_loss: 0.4148 - val_pre_intent_loss: 0.2199 - val_pre_ner_loss: 0.1949 - val_pre_intent_accuracy: 0.9375 - val_pre_ner_accuracy: 0.9385\n",
      "Epoch 194/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1347 - pre_intent_loss: 0.0182 - pre_ner_loss: 0.1166 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9577 - val_loss: 0.3992 - val_pre_intent_loss: 0.2302 - val_pre_ner_loss: 0.1690 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9497\n",
      "Epoch 195/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.1293 - pre_intent_loss: 0.0179 - pre_ner_loss: 0.1115 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9594 - val_loss: 0.4275 - val_pre_intent_loss: 0.2562 - val_pre_ner_loss: 0.1713 - val_pre_intent_accuracy: 0.9219 - val_pre_ner_accuracy: 0.9492\n",
      "Epoch 196/200\n",
      "35/35 [==============================] - 0s 12ms/step - loss: 0.1234 - pre_intent_loss: 0.0170 - pre_ner_loss: 0.1064 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9602 - val_loss: 0.3916 - val_pre_intent_loss: 0.2247 - val_pre_ner_loss: 0.1670 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9409\n",
      "Epoch 197/200\n",
      "35/35 [==============================] - 0s 11ms/step - loss: 0.1209 - pre_intent_loss: 0.0164 - pre_ner_loss: 0.1045 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9609 - val_loss: 0.3924 - val_pre_intent_loss: 0.2312 - val_pre_ner_loss: 0.1611 - val_pre_intent_accuracy: 0.9427 - val_pre_ner_accuracy: 0.9518\n",
      "Epoch 198/200\n",
      "35/35 [==============================] - 1s 15ms/step - loss: 0.1188 - pre_intent_loss: 0.0166 - pre_ner_loss: 0.1022 - pre_intent_accuracy: 0.9915 - pre_ner_accuracy: 0.9610 - val_loss: 0.4054 - val_pre_intent_loss: 0.2453 - val_pre_ner_loss: 0.1602 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9521\n",
      "Epoch 199/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1157 - pre_intent_loss: 0.0160 - pre_ner_loss: 0.0997 - pre_intent_accuracy: 0.9924 - pre_ner_accuracy: 0.9614 - val_loss: 0.4134 - val_pre_intent_loss: 0.2516 - val_pre_ner_loss: 0.1618 - val_pre_intent_accuracy: 0.9271 - val_pre_ner_accuracy: 0.9487\n",
      "Epoch 200/200\n",
      "35/35 [==============================] - 1s 20ms/step - loss: 0.1135 - pre_intent_loss: 0.0161 - pre_ner_loss: 0.0973 - pre_intent_accuracy: 0.9920 - pre_ner_accuracy: 0.9620 - val_loss: 0.3986 - val_pre_intent_loss: 0.2411 - val_pre_ner_loss: 0.1575 - val_pre_intent_accuracy: 0.9323 - val_pre_ner_accuracy: 0.9508\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<tensorflow.python.keras.callbacks.History at 0x7fbf307dc910>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(train_dataset,epochs=params['epochs'],validation_data=valid_dataset,callbacks=[checkpoint,reduce_lr])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.save_weights('../ner_model_weight/model_encoder_714.h5')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
